<html>
<head>
<script src="http://localhost/php/js/jquery.js"></script>
<script type="text/javascript">

$(document).ready(function()
{


<?php
if(isset($_GET['management']) && $_GET['management']=='client'){
?>

$("#saveclient").click(function(){
$.ajax({
url:"index.php?management=client&&task=add",
 success:function(result)
  {
  $('#formlist').html(result);
  },
  error:function(result)
  {
    $('#formlist').html(result);

  }
  });
});

$("body").on("click","#add",function()
{
$('#clientform').toggle();
//alert('gfdgfd');
//$("#clientform").show();
});

<?php } ?>

});

</script>
</head><body>

<?php
error_reporting(E_ALL ^ E_NOTICE);
include("include/function.php");
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>
<?php 
if($_GET['management']=='user')
{
	if($_GET['task']=='add')
	{
		include("admin/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("admin/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("admin/delete.php");
	}
	
	
	else{
		include("admin/user_list.php");
		}
}
elseif($_GET['management']=='role')
{
	if($_GET['task']=='add')
	{
		include("role/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("role/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("role/delete.php");
	}
	
	
	else{
		include("role/role_list.php");
		}



}
elseif($_GET['management']=='project')
{
if($_GET['task']=='add')
	{
		include("project/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("project/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("project/delete.php");
	}
	
	
	else{
		include("project/project_list.php");
		}
}
elseif($_GET['management']=='client')
{
	if($_GET['task']=='add')
	{
		include("client/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("client/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("client/delete.php");
	}
	
	
	else{
		include("client/client_list.php");
		}

}



?>







<a href="index.php?management=user">User Management</a><br>
<a href="index.php?management=role">Role Management</a><br>
<a href="index.php?management=project">Project Management</a><br>
<a href="index.php?management=client">Client Management</a><br>

<?php
}
else
{
header("Location: login.php");
}
?>
</body>
</html>